from building import *
import rtconfig
# get current directory
cwd     = GetCurrentDir()
# The set of source files associated with this SConscript file.

#src     = Glob('src/omv/*.c')
#src    += Glob('src/omv/img/*.c')
#src    += Glob('src/omv/py/*.c')
src      = Glob('*.c')

path    = [cwd + '/']
#path   += [cwd + '/port_device']
#path   += [cwd + '/src/omv']
#path   += [cwd + '/src/omv/img']
#path   += [cwd + '/src/omv/py']
#path   += [cwd + '/src/omv/boards']
#path   += [cwd + '/src/omv/boards/OPENMV3']

#LOCAL_CCFLAGS = ' -include "port/mpy_project_cfg.h"'

if rtconfig.CROSS_TOOL == 'gcc':
    LOCAL_CCFLAGS = ' -std=c99'
elif rtconfig.CROSS_TOOL == 'keil':
    LOCAL_CCFLAGS = ' --c99'

#LOCAL_CCFLAGS+= 'LC3_PLUS'

#local_defines = ['STANDALONE']
local_defines = ['LC3_BASIC_BT']
local_defines += ['DISABLE_HR']


group = DefineGroup('Codec', src, depend = ['PKG_USING_LC3_CODEC'], CPPPATH = path, LOCAL_CCFLAGS = LOCAL_CCFLAGS, LOCAL_CPPDEFINES = local_defines)

Return('group')
